package com.clkj.mobileinspector.ui.adapter;


import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.clkj.mobileinspector.R;
import com.clkj.mobileinspector.model.bean.MainBean;


import java.util.List;

import androidx.annotation.Nullable;

/**
 * @松 on 2019/7/18 09:50
 *
 */
public class MainActivityAdapter extends BaseQuickAdapter <MainBean,BaseViewHolder>{
    public MainActivityAdapter(@Nullable List<MainBean> data) {
        super(R.layout.rv_activity_main_menu,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, MainBean item) {
        ImageView iv = helper.getView(R.id.iv);
        iv.setImageResource(item.getIcon());
        helper.setText(R.id.tv_name, item.getName());
    }
}
